﻿<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
		<title>@Cms.PageTitle()</title>
		@Cms.ScriptInclude("Themes/Default/Scripts/jquery-1.7.min.js")
		@Cms.ScriptInclude("Themes/Default/Scripts/jquery-ui-1.8.16.custom.min.js")
		@Cms.ScriptInclude("Themes/Default/Scripts/jquery.validate.min.js")
		@Cms.ScriptInclude("Themes/Default/Scripts/jquery.validate.unobtrusive.min.js")
		@Cms.ScriptInclude("Themes/Default/Scripts/AjaxLogin.js")
	
		@Cms.CssLink("Themes/Default/Styles/Site.css")
		@Cms.CssLink("Themes/Default/Styles/jquery-ui/jquery-ui-1.8.16.custom.css")

		@Cms.AjaxAntiForgeryToken()

		<meta name="viewport" content="width=device-width">
		@RenderSection("head", false)
    </head>
    <body>
        <header>
			<div class="content-wrapper">
				<div class="float-left">
					<p class="site-title">@GetTitle()</p>
				</div>
				<div class="float-right">
					<section id="login">
                        @Html.Partial("_LogOnPartial")
                    </section>
					<nav id="mainmenu">
						@Cms.MainMenu(1, 1, 1)
					</nav>
				</div>
			</div>
        </header>
        <div id="body">
            @RenderSection("featured", false)
            <section class="content-wrapper main-content clear-fix">
                @RenderBody()
            </section>
        </div>
        <footer>
            <div class="content-wrapper">
                @Cms.ContentRegion("Footer")
            </div>
        </footer>
    </body>
</html>

@helper GetTitle()
{
	var homeUrl = Cms.CmsContext.Site.GetHomePageUrl();
	if (!String.IsNullOrEmpty(Cms.CmsContext.Host.Settings.PagesPrefix))
	{
		homeUrl = Cms.CmsContext.Host.Settings.PagesPrefix + homeUrl;
	}
	if (!homeUrl.StartsWith("/"))
	{
		homeUrl = "/" + homeUrl;
	}
	homeUrl = VirtualPathUtility.ToAbsolute("~" + homeUrl);
	<a href="@homeUrl">@Cms.CmsContext.Site.Name</a>
}